/**
 * 
 */
package com.dalonedrow.engine.sprite.impl;

import com.dalonedrow.engine.sprite.base.SimpleVector3;
import com.dalonedrow.engine.sprite.base.SpriteBase;
import com.dalonedrow.engine.sprite.base.SpriteBaseImpl;

/**
 * @author Donald
 */
public final class BasicTriangleSpriteObject extends SpriteBaseImpl {
	/** the length of the rendering array. */
	private final int		floatLen	= 9;
	/** storage array for rendering values. */
	private float[]	floatStore	= new float[floatLen];
	/** the full value of the Height. */
	private int		fullHeight;
	/** the full value of the texture's bottom coordinates. */
	private float	fullTcBottom;
	/** the full value of the texture's left coordinates. */
	private float	fullTcLeft;
	/** the full value of the texture's right coordinates. */
	private float	fullTcRight;
	/** the full value of the texture's top coordinates. */
	private float	fullTcTop;
	/** the full value of the Width. */
	private int		fullWidth;
	/** the full value of the {@link SpriteBase}'s Xl position. */
	private float	fullX1;
	/** the full value of the {@link SpriteBase}'s X2 position. */
	private float	fullX2;
	/** the full value of the {@link SpriteBase}'s X3 position. */
	private float	fullX3;
	/** the full value of the {@link SpriteBase}'s Xl position. */
	private float	fullXl;
	/** the full value of the {@link SpriteBase}'s Xr position. */
	private float	fullXr;
	/** the full value of the {@link SpriteBase}'s Yl position. */
	private float	fullY1;
	/** the full value of the {@link SpriteBase}'s Y2 position. */
	private float	fullY2;
	/** the full value of the {@link SpriteBase}'s Y3 position. */
	private float	fullY3;
	/** the full value of the {@link SpriteBase}'s Yb position. */
	private float	fullYb;
	/** the full value of the {@link SpriteBase}'s Yt position. */
	private float	fullYt;
	/** the unmodified height. */
	private int		height;
	/** the sprite's image reference id. */
	private int		imageRefId;
	/** the value of all modifications applied to the Height. */
	private int		modHeight;
	/**
	 * the value of all modifications applied to the texture's bottom
	 * coordinates.
	 */
	private float	modTcBottom;
	/**
	 * the value of all modifications applied to the texture's left coordinates.
	 */
	private float	modTcLeft;
	/**
	 * the value of all modifications applied to the texture's right
	 * coordinates.
	 */
	private float	modTcRight;
	/** 
	 * the value of all modifications applied to the texture's top coordinates. 
	 */
	private float	modTcTop;
	/** the value of all modifications applied to the Width. */
	private int		modWidth;
	/**
	 * the value of all modifications applied to the {@link SpriteBase}'s Xl
	 * position.
	 */
	private float	modXl;
	/**
	 * the value of all modifications applied to the {@link SpriteBase}'s Xr
	 * position.
	 */
	private float	modXr;
	/**
	 * the value of all modifications applied to the {@link SpriteBase}'s Yb
	 * position.
	 */
	private float	modYb;
	/**
	 * the value of all modifications applied to the {@link SpriteBase}'s Yt
	 * position.
	 */
	private float	modYt;
	/** the position. */
	private SimpleVector3	position;
	/** the value of the texture's bottom coordinates. */
	private float	tcBottom;
	/** the value of the texture's left coordinates. */
	private float	tcLeft;
	/** the value of the texture's right coordinates. */
	private float	tcRight;
	/** the value of the texture's top coordinates. */
	private float	tcTop;
	/** the unmodified width. */
	private int		width;
	/** the base value of the {@link SpriteBase}'s Xl position. */
	private float	x1;
	/** the base value of the {@link SpriteBase}'s X2 position. */
	private float	x2;
	/** the base value of the {@link SpriteBase}'s X3 position. */
	private float	x3;
	/** the base value of the {@link SpriteBase}'s Yl position. */
	private float	y1;
	/** the base value of the {@link SpriteBase}'s Y2 position. */
	private float	y2;
	/** the base value of the {@link SpriteBase}'s Y3 position. */
	private float	y3;
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float[] getFloatStore() {
		return floatStore;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public int getFullHeight() {
		return fullHeight;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullTCBottom() {
		return fullTcBottom;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullTCLeft() {
		return fullTcLeft;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullTCRight() {
		return fullTcRight;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullTCTop() {
		return fullTcTop;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public int getFullWidth() {
		return fullWidth;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullX1() {
		return fullX1;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullX2() {
		return fullX2;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullX3() {
		return fullX3;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullXl() {
		return fullXl;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullXr() {
		return fullXr;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullY1() {
		return fullY1;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullY2() {
		return fullY2;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullY3() {
		return fullY3;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullYb() {
		return fullYb;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getFullYt() {
		return fullYt;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public int getHeight() {
		return height;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public int getImageRefId() {
		return imageRefId;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public int getModHeight() {
		return modHeight;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getModTCBottom() {
		return modTcBottom;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getModTCLeft() {
		return modTcLeft;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getModTCRight() {
		return modTcRight;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getModTCTop() {
		return modTcTop;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public int getModWidth() {
		return modWidth;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getModXl() {
		return modXl;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getModXr() {
		return modXr;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getModYb() {
		return modYb;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getModYt() {
		return modYt;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public SimpleVector3 getPosition() {
		return position;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getTCBottom() {
		return tcBottom;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getTCLeft() {
		return tcLeft;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getTCRight() {
		return tcRight;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getTCTop() {
		return tcTop;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public int getType() {
		return SpriteBase.TYPE_08_TRIANGLES;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public int getWidth() {
		return width;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getX1() {
		return x1;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getX2() {
		return x2;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getX3() {
		return x3;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getY1() {
		return y1;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getY2() {
		return y2;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public float getY3() {
		return y3;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullHeight(final int h) {
		fullHeight = h;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullTCBottom(final float val) {
		fullTcBottom = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullTCLeft(final float val) {
		fullTcLeft = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullTCRight(final float val) {
		fullTcRight = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullTCTop(final float val) {
		fullTcTop = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullWidth(final int w) {
		fullWidth = w;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullX1(final float val) {
		fullX1 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullX2(final float val) {
		fullX2 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullX3(final float val) {
		fullX3 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullXl(final float val) {
		fullXl = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullXr(final float val) {
		fullXr = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullY1(final float val) {
		fullY1 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullY2(final float val) {
		fullY2 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullY3(final float val) {
		fullY3 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullYb(final float val) {
		fullYb = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setFullYt(final float val) {
		fullYt = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setHeight(final int h) {
		height = h;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setImageRefId(final int refId) {
		imageRefId = refId;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setModHeight(final int h) {
		modHeight = h;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setModTCBottom(final float val) {
		modTcBottom = val;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setModTCLeft(final float val) {
		modTcLeft = val;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setModTCRight(final float val) {
		modTcRight = val;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setModTCTop(final float val) {
		modTcTop = val;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setModWidth(final int w) {
		modWidth = w;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setModXl(final float val) {
		modXl = val;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setModXr(final float val) {
		modXr = val;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setModYb(final float val) {
		modYb = val;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setModYt(final float val) {
		modYt = val;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setPosition(final double x, final double y, final double z) {
		if (position != null) {
			position.set(x, y, z);
		} else {
			position = new SimpleVector3(x, y, z);
		}
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setPosition(final SimpleVector3 v) {
		position = v;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setTCBottom(final float val) {
		tcBottom = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setTCLeft(final float val) {
		tcLeft = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setTCRight(final float val) {
		tcRight = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setTCTop(final float val) {
		tcTop = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setWidth(final int w) {
		width = w;
		super.setFloatStoreNumber(0);
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setX1(final float val) {
		x1 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setX2(final float val) {
		x2 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setX3(final float val) {
		x3 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setY1(final float val) {
		y1 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setY2(final float val) {
		y2 = val;
	}
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setY3(final float val) {
		y3 = val;
	}
}
